package com.itheima.deepseekaixuhui.controller;

import com.itheima.deepseekaixuhui.Service.impl.DeepSeeKServiceImpl;
import com.itheima.deepseekaixuhui.dto.Result;
import com.itheima.deepseekaixuhui.pojo.UserInput;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
/**
 * @author 21829
 */
@RestController
@RequestMapping("/DeepSeeK")
public class DeepSeeKaiController {

    @Resource
    private DeepSeeKServiceImpl deepSeekServiceImpl;


//    @GetMapping("/AI")
    @PostMapping("/AI")
    private Result deepSeek(@RequestBody UserInput input){
        String aiReply = deepSeekServiceImpl.chatApi(input);
        return Result.ok(aiReply);
    }


}
